package com.liuda066.forumssm.services;

import com.liuda066.forumssm.model.Message;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author : niu niu
 * @version : 1.0.0
 * @date : 2023/9/5 22:48
 */
public interface IMessageService {
    @Transactional
    void create(Message message);

    Integer selectUnreadCount(Long userId);

    List<Message> selectByReceiveUserId(@Param("receiveUserId") Long receiveUserId);

    Message selectById(Long id);

    void updateStateById(Long id , Byte state);

    @Transactional
    void reply(Long repliedId,Message message);
}
